home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / mf / inputs / misc / xymisc10.mf < prev    next >
Text File  |  1995-03-15  |  4KB  |  133 lines

  1. % $Id: xymisc10.mf,v 2.6 1992/06/24 01:23:34 kris Exp $ -*-tex-*-
  2. %
  3. % XYMISC10: miscellaneous characters for XY mode at 10 point.
  4. % Copyright (c) 1991,1992  Kristoffer H. Rose  <kris@diku.dk>
  5. %
  6. % This file is part of the XY-pic macro package.
  7. %
  8. % The XY-pic macro package is free software; you can redistribute it and/or
  9. % modify it under the terms of the GNU General Public License as published by
  10. % the Free Software Foundation; either version 2 of the License, or (at your
  11. % option) any later version.
  12. %
  13. % The XY-pic macro package is distributed in the hope that it will be
  14. % useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  16. % Public License for more details.
  17. %
  18. % You should have received a copy of the GNU General Public License along
  19. % with this macro package; if not, write to the Free Software Foundation, Inc.,
  20. % 675 Mass Ave, Cambridge, MA 02139, USA.
  21. %
  22. % CONTENTS:
  23. %   Metaness.
  24. %   Testing...
  25. %   Font.
  26. %     Dot fitting the rule width.
  27. %     Quarter circles with radii from 1 to 10 and 12 to 30 pt; all have
  28. %    height = depth = .5width = radius and are centered such that they
  29. %    enter and leave the box in the middle of the sides.
  30. %
  31. font_identifier "XYMISC"; font_size 10pt#;
  32. font_coding_scheme:="XY miscellaneous";
  33. mode_setup;
  34.  
  35. % METANESS...
  36. %
  37. rulew# = .4pt#; define_whole_blacker_pixels(rulew); % line thickness
  38. %
  39. def pickuppen = pickup pencircle scaled rulew enddef;
  40.  
  41. % TESTING...we redefine openit because the characters extend far to the
  42. % left of the bounding box!
  43. %
  44. def openit = %%let echar = endchar; def endchar = echar; stop ". " enddef;
  45.  openwindow currentwindow
  46.   from origin to (1000,800) at (-200,300)
  47.  enddef;
  48.  
  49. % FONT.
  50. %
  51. % Font dimension 8 is the rule thickness (cf. The TeXbook, app.G)
  52. fontdimen 8: rulew#;
  53.  
  54. % DOT FOR DOTTED LINES AND DUMMY CIRCLE...
  55. %
  56. beginchar(0,0,0,0); pickuppen; drawdot (0,0); endchar;
  57. beginchar(1,0,0,0); pickuppen; drawdot (0,0); endchar;
  58. beginchar(2,0,0,0); pickuppen; drawdot (0,0); endchar;
  59. beginchar(3,0,0,0); pickuppen; drawdot (0,0); endchar;
  60.  
  61. % QUARTER CIRCLES...  The four circles with radius N pt, 0 < N <= 10, are
  62. % located at N*4 + QUADRANT, where 1 <= QUADRANT <= 4.  All have width as
  63. % their radius with reference point at the level of the horizontal end of the
  64. % arc and height, depth as the extent of the arc.
  65. %
  66. for radius = 1 step 1 until 10:
  67.  beginchar(radius*4,2radius*pt#,radius*pt#,radius*pt#);
  68.   pickuppen;
  69.   draw quartercircle rotated 180 shifted (1,.5) scaled (radius*2pt);
  70.  endchar;
  71.  beginchar(radius*4+1,2radius*pt#,radius*pt#,radius*pt#);
  72.   pickuppen;
  73.   draw quartercircle rotated -90 shifted (0,.5) scaled (radius*2pt);
  74.  endchar;
  75.  beginchar(radius*4+2,2radius*pt#,radius*pt#,radius*pt#);
  76.   pickuppen;
  77.   draw quartercircle shifted (0,-.5) scaled (radius*2pt);
  78.  endchar;
  79.  beginchar(radius*4+3,2radius*pt#,radius*pt#,radius*pt#);
  80.   pickuppen;
  81.   draw quartercircle rotated 90 shifted (1,-.5) scaled (radius*2pt);
  82.  endchar;
  83. endfor;
  84. %
  85. % For 12 <= N <= 40 we step in 2pt increments... so for 10 <= N <= 40 the
  86. % quarter circle with radius N is located at (N div 2 + 20 + QUADRANT).
  87. %
  88. for radius = 12 step 2 until 40:
  89.  beginchar(radius*2+20,2radius*pt#,radius*pt#,radius*pt#);
  90.   pickuppen;
  91.   draw quartercircle rotated 180 shifted (1,.5) scaled (radius*2pt);
  92.  endchar;
  93.  beginchar(radius*2+21,2radius*pt#,radius*pt#,radius*pt#);
  94.   pickuppen;
  95.   draw quartercircle rotated -90 shifted (0,.5) scaled (radius*2pt);
  96.  endchar;
  97.  beginchar(radius*2+22,2radius*pt#,radius*pt#,radius*pt#);
  98.   pickuppen;
  99.   draw quartercircle shifted (0,-.5) scaled (radius*2pt);
  100.  endchar;
  101.  beginchar(radius*2+23,2radius*pt#,radius*pt#,radius*pt#);
  102.   pickuppen;
  103.   draw quartercircle rotated 90 shifted (1,-.5) scaled (radius*2pt);
  104.  endchar;
  105. endfor;
  106.  
  107. bye.
  108. %
  109. % $Log: xymisc10.mf,v $
  110. % Revision 2.6  1992/06/24  01:23:34  kris
  111. % Cleaned up.
  112. %
  113. % Revision 2.1  1992/01/02  14:54:07  kris
  114. % Release version.
  115. %
  116. % Revision 1.6  1991/11/27  06:54:21  kris
  117. % \beta-test on DIKU.
  118. %
  119. % Revision 1.5  1991/10/21  23:19:08  kris
  120. % Version described in DIKU student report 91-7-10.
  121. %
  122. % Revision 1.4  1991/08/22  01:07:46  kris
  123. % Now has quarter circles to radius 40pt as required for xy.doc[1.28].
  124. %
  125. % Revision 1.3  1991/07/21  21:04:35  kris
  126. % Tested with xy.doc[1.19].
  127. %
  128. % Revision 1.2  1991/07/19  14:52:26  kris
  129. % Changed quarter circles to fit xy.doc[1.19?].
  130. % Revision 1.1  1991/06/24  20:57:37  kris
  131. % Works with xy.doc [1.6] :-)
  132.